<?php

class CNotAllowedException extends Exception {
	private $Action;

	public function action() {
		return $this->Action;
	}

	protected function setAction($newValue) {
		$this->Action = $newValue;
		return $this;
	}

	function __construct($action = null, $message = null) {
		CDefault($message, $action? "Action not allowed: $action" : "Action not allowed");
		parent::__construct((string) $message);
	}
}

?>